<?php
require("../funciones.php"); 
require("../funcionesDB.php"); 
open_html();
?><head><?php
do_header("Calibula - Login");
?>
<link rel="stylesheet" type="text/css" href="/calibula/css/noticia/styles.css" />
</head>
<body>
<center>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<form name="frm_alta" action="validate_user.php" method="post">
<table border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td bgcolor="#A6A6A6">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="7"></td>
					<td>INGRESAR A CALIBULA</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table border="0" cellpadding="4" cellspacing="0" width="300" bgcolor="#CCCCCC">
				<tr>
					<td height="6"></td>
				</tr>
				<tr>
					<td align="right">Usuario:</td>
					<td>
						<input class="input" type="text" name="username" value="<?php echo ($_REQUEST['usrerror']=='Y')?"":$_REQUEST['username']; ?>">
						<?php
							if($_REQUEST['usrerror']=='Y') {
								echo '<img src="../img/s_error.png">';
							}
						?>
					</td>
				</tr>
				<tr>
					<td align="right">Password:</td>
					<td>
						<input class="input" type="password" name="password" value="<?php echo $_REQUEST['pwderror']=='Y'?"":$_REQUEST['password']; ?>">
						<?php
							if($_REQUEST['pwderror']=='Y') {
								echo '<img src="../img/s_error.png">';
							}
						?>
					</td>
				</tr>
				<tr>
					<td></td>
					<td><input class="input" type="submit" name="save" value="Entrar"></td>
				</tr>
			</table>
			<?php
				if($_REQUEST['usrerror']=='Y' || $_REQUEST['pwderror']=='Y') {
					echo "<center><font color='red'>Complete los campos faltantes</font></center>";
				}
				if($_REQUEST['inxerror']=='Y') {
					echo "<center><font color='red'>Datos erroneos, completelos nuevamente</font></center>";
				}
			?>		
		</td>
	</tr>
</table>
</form>
</center>
</body>
</html>